package lc_2938_区分黑球与白球;

public class Solution {
    public long minimumSteps(String s) {
        long ans = 0, tot = 0;
        for (char c : s.toCharArray()) {
            if (c == '1') {
                tot++;
            } else {
                ans += tot;
            }
        }
        return ans;
    }

    public static void main(String[] args) {
        Solution so = new Solution();
        long ans = so.minimumSteps("100");
        System.out.println(ans);
    }

}